<?php
namespace Leads\Model\Entity;

class Person
{
	protected $id;
	protected $department;
	protected $firstname;
	protected $jobtitle;
	protected $lastname;
	protected $mobilephone;
	protected $officephone;
	protected $officefax;
	protected $ownedsecurableitem_id;
	protected $primaryaddress_address_id;
	protected $primaryemail_email_id;
	protected $title_customfield_id;
	
	

	public function exchangeArray($data)
	{
		$this->id = (isset($data['id'])) ? $data['id'] : null;
		$this->department= (isset($data['department'])) ? $data['department'] : null;
		$this->firstname = (isset($data['firstname'])) ? $data['firstname'] : null;
		$this->jobtitle= (isset($data['jobtitle'])) ? $data['jobtitle'] : null;
		$this->lastname= (isset($data['lastname'])) ? $data['lastname'] : null;	
		$this->mobilephone= (isset($data['mobilephone'])) ? $data['mobilephone'] : null;
		$this->officephone= (isset($data['officephone'])) ? $data['officephone'] : null;
		$this->officefax= (isset($data['officefax'])) ? $data['officefax'] : null;
		$this->ownedsecurableitem_id= (isset($data['ownedsecurableitm_id'])) ? $data['ownedsecurableitm_id'] : null;
		$this->primaryaddress_address_id= (isset($data['primaryaddress_address_id'])) ? $data['primaryaddress_address_id'] : null;
		$this->primaryemail_email_id= (isset($data['primaryemail_email_id'])) ? $data['primaryemail_email_id'] : null;
		$this->title_customfield_id = (isset($data['title_customfield_id'])) ? $data['title_customfield_id'] : null;
	}

	
	public function __construct(array $options = null) {
		if (is_array($options)) {
			$this->setOptions($options);
		}
	}
	/*
	public function __set($name, $value) {
	$method = 'set' . $name;
	if (!method_exists($this, $method)) {
		throw new Exception('Invalid Method');
	}
	$this->$method($value);
	}
	
	public function __get($name) {
	$method = 'get' . $name;
	if (!method_exists($this, $method)) {
		throw new Exception('Invalid Method');
	}
	return $this->$method();
	}
	
	public function setOptions(array $options) {
	$methods = get_class_methods($this);
	foreach ($options as $key => $value) {
		$method = 'set' . ucfirst($key);
		if (in_array($method, $methods)) {
			$this->$method($value);
		}
	}
	return $this;
	}
	*/
	public function getId() {
		return $this->_id;
	}
	public function setId($id) {
		$this->_id = $id;
		return $this;
	}
	
	public function getDepartment() {
		return $this->_department;
	}
	public function setDepartment($department) {
		$this->_department= $department;
		return $this;
	}
	
	public function getFirstName() {
		return $this->_firstname;
	}
	public function setFirstName($firstname) {
		$this->_firstname= $firstname;
		return $this;
	}
	
	public function getJobTitle() {
		return $this->_jobtitle;
	}
	public function setJobTitle($jobtitle) {
		$this->_jobtitle= $jobtitle;
		return $this;
	}
	
	public function getLastName() {
		return $this->_lastname;
	}
	public function setLastName($lastname) {
		$this->_lastname= $lastname;
		return $this;
	}
	
	public function getMobilePhone() {
		return $this->_mobilephone;
	}
	public function setMobilePhone($mobilephone) {
		$this->_mobilephone= $mobilephone;
		return $this;
	}
	
	public function getOfficePhone() {
		return $this->_officephone;
	}
	public function setOfficePhone($officephone) {
		$this->_officephone= $officephone;
		return $this;
	}
	
	public function getOfficeFax() {
		return $this->_officefax;
	}
	public function setOfficeFax($officefax) {
		$this->_officefax= $officefax;
		return $this;
	}
	
	public function getOwnedSecurableItem() {
		return $this->_ownedsecurableitem_id;
	}
	public function setOwnedSecurableItem($ownedsecurableitem_id) {
		$this->_ownedsecurableitem_id= $ownedsecurableitem_id;
		return $this;
	}
	
	public function getPrimaryAddress() {
		return $this->_primaryaddress_address_id;
	}
	public function setPrimaryAddress($primaryaddress_address_id) {
		$this->_primaryaddress_address_id= $primaryaddress_address_id;
		return $this;
	}
	
	public function getPrimaryEmail() {
		return $this->_primaryemail_email_id;
	}
	public function setPrimaryEmail($primaryemail_email_id) {
		$this->_primaryemail_email_id= $primaryemail_email_id;
		return $this;
	}
	
	public function getTitle() {
		return $this->_title_customfield_id;
	}
	public function setTitle($title_customefield_id) {
		$this->_title_customfield_id= $title_customefield_id;
		return $this;
	}
}
?>